package com.promis.util;

import android.content.Context;
import android.net.Uri;

import java.io.File;

/**
 * Created by jidanbo on 2017/12/20.
 */

public class URIUtils {

    public static Uri fromFile(Context context, File file) {
        if (context == null || file == null) return null;
//        if (Build.VERSION.SDK_INT >= 24) {
//            return FileProvider.getUriForFile(context.getApplicationContext(), context.getApplicationContext().getPackageName() + ".provider", FileUtils.getCropImgFile(context));
//        } else {
            return Uri.fromFile(file);
//        }
    }
}
